<?php PageUtil::addVar("stylesheet","<link href=\"".$stylepath."/forum.css\" rel=\"stylesheet\">");?>
<div class="content_block col-xs-12 col-sm-12 col-md-12 col-lg-12">
		<?php if(!empty($categories)){ ?>
			<?php
				foreach ($categories['parents'][0] as $key => $category) {
			?>
			<table class="table table-hover">
		 		<thead>
					<tr>
						<th width="70%" style="line-height: 28px;"><img src="<?php echo $imagepath;?>/topic_icon.png"> <?php echo $categories['items'][$category]["name"];?></th>
						<th></th>
					</tr>
				</thead>
				<tbody>
				<?php
					if(!empty($categories['parents'][$category])){
						foreach ($categories['parents'][$category] as $key => $child) {
				?>
					<tr>
						<td>
							<p class="category-list subcategory-list">
								<a href="<?php echo base_url('forum/category/'.$categories['items'][$child]["url"]);?>"><strong><?php echo $categories['items'][$child]["name"];?></strong></a><br />
								<span class="muted"><small><?php echo $categories['items'][$child]["description"];?></small></span>
							</p>
						</td>
						<td class="category-list-detail">
							กระทู้ทั้งหมด 868<br />
							เมื่อ 25 พฤศจิกายน 2556
						</td>
					</tr>
				<?php 
						}
					}else{
						?>
						<tr>
							<td colspan="2">
								<div class="alert alert-danger">
									<p class="text-center">ยังไม่มีหมวดหมู่ย่อย</p>
								</div>
							</td>
						</tr>
						<?php
					}
				?>
				</tbody>
			<?php 
				}
			}
			?>
		</table>
	<?php 
		if(empty($categories)){
		?>
		<div class="alert_area">
				<div class="alert_detail">
					<p class="text-center">ยังไม่มีกระทู้</p>
				</div>
		</div>
		<?php 
		}
		?>
</div>